/*
 * @Author: 六弦(melodyWxy)
 * @Date: 2022-03-01 14:34:05
 * @LastEditors: 六弦(melodyWxy)
 * @LastEditTime: 2022-03-01 15:37:56
 * @FilePath: /menorepo-demo/Users/wxy/codeWorks/up/d_form/antd-demo-ts/src/pages/AddForm/Step2/index.tsx
 * @Description: update here
 */

import { useState, FC }  from 'react';
import { Button } from "antd"
import XForm from "../../../components/XForm"
import { FormSchema } from "../../../components/XForm/type"

import { Step2Props } from './../type';

const Step2: FC<Step2Props> = ({ schema })=> {
    const [ showForm, setShow] = useState(false);
    return (
        <div>
            <Button type="primary" onClick={()=>setShow(true)}>预览</Button>
            {showForm && <XForm schema={schema as FormSchema}/>}
        </div>
    )
}


export default Step2